Type Property (Attachment Object) 

The Type property describes the attachment type. Read/write.

Syntax

objAttachment.Type

Data Type

Long

Remarks

The following attachment types are supported:

Type property

Value

Description

mapiFileData

1

Attachment is the contents of a file. (Default value.)

mapiFileLink

2

Attachment is a link to a file.

mapiOLE

3

Attachment is an OLE object.

mapiEmbeddedMessage

4

Attachment is an embedded message.

 

The value of the Type property determines the valid values for the SourceT1L9WE property.

The Attachment object Type property corresponds to the MAPI property PR_ATTACH_METHOD.

Example

' from the function Attachments_Add()

    Set objAttach = objAttachColl.Add         ' add an attachment

    With objAttach

        .Type = mapiFileLink

        .Position = 0   ' place at end of message

        .Source = "\\server\bitmaps\honey.bmp"  ' UNC name

    End With

    ' must update the message to save the new info

    objOneMsg.Update   ' update the message

    MsgBox "Added an attachment of type mapiFileLink"

 

See Also

Add Method (Attachments Collection)YS6R2P, ReadFromFile Method (Attachment Object)7TMO9S, WriteToFile Method (Attachment Object)RHDXP3